home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / vidlibp / vidabout.frm < prev    next >
Text File  |  1995-05-01  |  8KB  |  241 lines

  1. VERSION 2.00
  2. Begin Form VidAbout 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "About Video Library"
  5.    ClientHeight    =   2460
  6.    ClientLeft      =   1230
  7.    ClientTop       =   795
  8.    ClientWidth     =   4980
  9.    FontBold        =   -1  'True
  10.    FontItalic      =   0   'False
  11.    FontName        =   "MS Sans Serif"
  12.    FontSize        =   12
  13.    FontStrikethru  =   0   'False
  14.    FontUnderline   =   0   'False
  15.    Height          =   2865
  16.    HelpContextID   =   430
  17.    Left            =   1170
  18.    LinkTopic       =   "Form1"
  19.    MaxButton       =   0   'False
  20.    MinButton       =   0   'False
  21.    ScaleHeight     =   2460
  22.    ScaleWidth      =   4980
  23.    Top             =   450
  24.    Width           =   5100
  25.    Begin PictureBox picIcon 
  26.       AutoSize        =   -1  'True
  27.       Height          =   510
  28.       HelpContextID   =   430
  29.       Left            =   495
  30.       Picture         =   VIDABOUT.FRX:0000
  31.       ScaleHeight     =   480
  32.       ScaleWidth      =   480
  33.       TabIndex        =   1
  34.       Top             =   225
  35.       Width           =   510
  36.    End
  37.    Begin CommandButton cmdOK 
  38.       Cancel          =   -1  'True
  39.       Caption         =   "&OK"
  40.       Default         =   -1  'True
  41.       Height          =   465
  42.       HelpContextID   =   430
  43.       Left            =   270
  44.       TabIndex        =   0
  45.       Top             =   1650
  46.       Width           =   960
  47.    End
  48.    Begin Label lblResourcesValue 
  49.       Height          =   240
  50.       Left            =   3330
  51.       TabIndex        =   13
  52.       Top             =   2100
  53.       Width           =   1230
  54.    End
  55.    Begin Label lblSpaceValue 
  56.       Height          =   240
  57.       Left            =   3330
  58.       TabIndex        =   11
  59.       Top             =   1875
  60.       Width           =   1230
  61.    End
  62.    Begin Label lblWinModeValue 
  63.       Height          =   240
  64.       Left            =   3330
  65.       TabIndex        =   9
  66.       Top             =   1650
  67.       Width           =   1230
  68.    End
  69.    Begin Label lblWinVersionValue 
  70.       Height          =   240
  71.       Left            =   3330
  72.       TabIndex        =   7
  73.       Top             =   1425
  74.       Width           =   1230
  75.    End
  76.    Begin Label lblVersionValue 
  77.       Height          =   240
  78.       Left            =   3330
  79.       TabIndex        =   5
  80.       Top             =   900
  81.       Width           =   1230
  82.    End
  83.    Begin Label lblSpace 
  84.       Caption         =   "Free Space:"
  85.       Height          =   240
  86.       Left            =   1620
  87.       TabIndex        =   10
  88.       Top             =   1875
  89.       Width           =   1545
  90.    End
  91.    Begin Label lblWinMode 
  92.       AutoSize        =   -1  'True
  93.       Caption         =   "Windows Mode:"
  94.       Height          =   195
  95.       Left            =   1620
  96.       TabIndex        =   8
  97.       Top             =   1650
  98.       Width           =   1365
  99.    End
  100.    Begin Label lblWinVersion 
  101.       Caption         =   "Windows Version:"
  102.       Height          =   195
  103.       Left            =   1620
  104.       TabIndex        =   6
  105.       Top             =   1425
  106.       Width           =   1530
  107.    End
  108.    Begin Label lblResources 
  109.       AutoSize        =   -1  'True
  110.       Caption         =   "Free Resources:"
  111.       Height          =   195
  112.       Left            =   1620
  113.       TabIndex        =   12
  114.       Top             =   2100
  115.       Width           =   1410
  116.    End
  117.    Begin Line linDivide 
  118.       BorderWidth     =   3
  119.       X1              =   1620
  120.       X2              =   4545
  121.       Y1              =   1275
  122.       Y2              =   1275
  123.    End
  124.    Begin Label lblName 
  125.       Alignment       =   2  'Center
  126.       AutoSize        =   -1  'True
  127.       Caption         =   "Video Library Database Management System"
  128.       FontBold        =   -1  'True
  129.       FontItalic      =   0   'False
  130.       FontName        =   "MS Sans Serif"
  131.       FontSize        =   9.75
  132.       FontStrikethru  =   0   'False
  133.       FontUnderline   =   0   'False
  134.       Height          =   555
  135.       Left            =   1575
  136.       TabIndex        =   3
  137.       Top             =   225
  138.       Width           =   3045
  139.       WordWrap        =   -1  'True
  140.    End
  141.    Begin Label lblVersion 
  142.       AutoSize        =   -1  'True
  143.       Caption         =   "Version:"
  144.       Height          =   195
  145.       Left            =   1620
  146.       TabIndex        =   4
  147.       Top             =   900
  148.       Width           =   705
  149.    End
  150.    Begin Label lblTitle 
  151.       Alignment       =   2  'Center
  152.       Caption         =   "Video Library"
  153.       FontBold        =   -1  'True
  154.       FontItalic      =   0   'False
  155.       FontName        =   "MS Sans Serif"
  156.       FontSize        =   12
  157.       FontStrikethru  =   0   'False
  158.       FontUnderline   =   0   'False
  159.       Height          =   615
  160.       Left            =   315
  161.       TabIndex        =   2
  162.       Top             =   825
  163.       Width           =   915
  164.    End
  165. End
  166. ' Subsystem: Help
  167. ' Module:    VidAbout.Frm
  168. ' Date:      01/01/94
  169. ' Author:    Richard Stauch
  170. ' Notes:
  171. ' The About form displays information about this program
  172. ' and the system. The information includes the version of
  173. ' this program, the Windows version and running mode, the
  174. ' amount of free space in the system and the percentage
  175. ' of free system resources.
  176.  
  177. ' The OK button and Icon are the only controls, and
  178. ' there are no input-capable fields on this form.
  179.  
  180. Option Explicit
  181. DefInt A-Z
  182.  
  183. ' Get the binary flag for Windows running mode.
  184. Declare Function GetWinFlags Lib "Kernel" () As Long
  185. Const WF_ENHANCED = &H20
  186.  
  187. ' Get free resource information.
  188. Declare Function GetFreeSystemResources Lib "User" (ByVal fuSysResource As Integer) As Integer
  189. Const GFSR_SYSTEMRESOURCES = &H0
  190.  
  191. ' Get Windows Version.
  192. Declare Function GetVersion Lib "Kernel" () As Integer
  193.  
  194. ' Get free memory.
  195. Declare Function GetFreeSpace Lib "Kernel" (ByVal wFlags As Integer) As Long
  196.  
  197. Sub cmdOK_Click ()
  198. ' Return to the main form.
  199.   Unload VidAbout
  200. End Sub
  201.  
  202. Sub Form_Load ()
  203. ' Load the About form.
  204. Dim X As Integer      ' Temp for Windows version and system resources.
  205. Dim Y As Integer      ' Windows version Modification number.
  206. Dim Z As Integer      ' Windows version Release number.
  207. Dim WinFlags As Long  ' Windows mode flag.
  208. Dim FreeSpace As Long ' Amount of free space in kilo-bytes.
  209. ' Display the version of this program.
  210.   lblVersionValue.Caption = VERSION
  211. ' Look up Windows Version number.
  212.   X% = GetVersion()
  213.   Y% = Int(X% / 256)        ' This is the Least Significant Digit.
  214.   Z% = Int(X% - (Y% * 256)) ' This is the Most Significant Digit.
  215. ' Format and display as "9.99".
  216.   lblWinVersionValue.Caption = Trim(Str(Z%)) & "." & Trim(Str(Y%))
  217. ' Look up Windows mode.
  218.   WinFlags& = GetWinFlags()
  219. ' Determine if windows is in 386 Enhanced mode or Standard.
  220.   If WinFlags& And WF_ENHANCED Then
  221.     lblWinModeValue.Caption = "386 Enh"
  222.   Else
  223.     lblWinModeValue.Caption = "Standard"
  224.   End If
  225. ' Retrieve free memory space and convert to Kilo-bytes.
  226.   FreeSpace& = (GetFreeSpace(0) / 1024)
  227. ' Display free space as Kilo-bytes.
  228.   lblSpaceValue.Caption = Trim(FreeSpace&) & " Kb"
  229. ' Get the percent of free system resources.
  230.   X% = GetFreeSystemResources(GFSR_SYSTEMRESOURCES)
  231. ' Show the percent of resources available.
  232.   lblResourcesValue.Caption = Trim(Str(X%)) & "%"
  233. End Sub
  234.  
  235. Sub picIcon_DblClick ()
  236. ' Display the first help topic in the Main help group.
  237. Dim R As Integer
  238.   R% = WinHelp(VidAbout.hWnd, HelpName$, HELP_CONTEXT, CLng(VIDLIB_MAIN))
  239. End Sub
  240.  
  241.